home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / Plurals / constant.h < prev    next >
C/C++ Source or Header  |  1992-04-06  |  2KB  |  77 lines

  1. /*
  2.  *    Plurals
  3.  *
  4.  *    Author:    S.C.Merrall
  5.  *
  6.  *    File:    constant.h
  7.  *
  8.  *    Contents:    FAIL
  9.  *            SUCCESS
  10.  *            TRUE
  11.  *            FALSE
  12.  *            SCRATCH_MEMORY_SIZE
  13.  *            FE_WORD
  14.  *
  15.  *    Description:       Universal constant definitions
  16.  *
  17.  *    Change History:
  18.  *
  19.  *    Date   Name Comment
  20.  *    -------- ---- -------
  21.  *    16:05:91 SCM  Recreated after accidentally deleting most of sources
  22.  *    22:05:91 SCM  Moved definition of SCRATCH_MEMORY_SIZE from mp_gc.h
  23.  *    06:04:92 SCM  Special addresses of NIL and NOT_NIL changed
  24.  *
  25.  */
  26.  
  27. #define FAIL 0
  28. #define SUCCESS 1
  29.  
  30. #ifdef TRUE
  31.  
  32. #else
  33.  
  34. #define FALSE 0
  35. #define TRUE 1
  36.  
  37. #endif
  38.  
  39. /* It is necessary for Feel to know the size of the scratch space     */
  40. /* mp_eubang.h includes this file so it is only file which has to     */
  41. /* be include in eubang.c                        */
  42.  
  43. #define SCRATCH_MEMORY_SIZE 64  /* 64 Bytes                      */
  44.  
  45. #define FE_WORD sizeof(int) /*  The front end encodes lipobjects in 32-bit 
  46.                  *  words. 
  47.                  */
  48.  
  49. #define MP_NONE_ACTIVE 1
  50. #define MP_SOME_ACTIVE 2
  51.  
  52. /*  #define NIL 0x7FFF
  53.  *  #define NOT_NIL 0x0001
  54.  *
  55.  *  These used to be just unique addresses, but for simplicity - mainly by
  56.  *  cutting down the number of comparisons made at run-time - I am 
  57.  *  now allocating symbolks for the objects - this means we can check the
  58.  *  contents without having to check if the object is actually there!
  59.  *  The addresses though are still unique and will be preserved through GC!
  60.  */
  61.  
  62. /*  These are the ids the objects are stored under in the table on the host */
  63.  
  64. #define MP_NIL_ID 0
  65. #define MP_T_ID 1
  66.  
  67. /*  These are the unique addresses, a better system will be to have two 
  68.  *  global variables with these values which are set at run-time, this is
  69.  *  in case the allocation strategy changes (e.g. 32-bit heap) - which might
  70.  *  cause  these unique addresses to change. This at the moment requires 
  71.  *  too much work, and can be delayed till I get round to hacking all the
  72.  *  files for GC in the middle of doing something coherence
  73.  */
  74.  
  75. #define NIL 1
  76. #define NOT_NIL 5
  77.